package exp06crawler;

import java.io.BufferedInputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Scanner;

public class CrawlerDemo {
    public static void main(String[] args) {
        try {
            URL name = new URL("http://www.ahstu.edu.cn");
            InputStream ips = name.openStream();
            Scanner cin = new Scanner(new BufferedInputStream(ips));
            while (cin.hasNextLine()) {
                System.out.println(cin.nextLine());
            }
        } catch (java.io.IOException e) {
            e.printStackTrace();
        }
    }
}
